<div class="path">
  <div> <a href="main.php?cg_u_type=2">卖家中心</a> <span>&gt;</span> <a href="main.php?m=product&s=admin_deliver">发货</a> <span>&gt;</span> <{if $smarty.get.status=='delivering'}>发货中的订单 
    <{elseif $smarty.get.status=='delivered'}>已收到货的订单
    <{else}>等待发货的订单<{/if}> </div>
</div>
<div class="main">
  <div class="wrap"> <{if $smarty.get.status=='send'}>
    <form method="post" id="deliver_form" name="deliver_form">
      <input type="hidden" name="status" value="send" />
      <input type="hidden" name="id" value="<{$de.order_id}>" />
      <div class="step-title"><em>第一步</em>确认收货信息及交易详情</div>
      <table class="table-list-style order">
        <tbody>
          <tr>
            <th colspan="20"> <span class="fl ml10">订单编号：<span style="color: #339900; font-family: Tahoma;"><{$de.order_id}></span></span> <span class="fl ml20">下单时间：<span style="color: #999999; font-family: Tahoma;"><{$de.creat_time|date_format:"%Y-%m-%d %H:%M:%S"}></span></span> </th>
          </tr>
        <{foreach item=plist from=$de.product}>
        <tr>
          <td width="10" class="bdl"></td>
          <td class="w80"><div class="pic-small">
          <a target="_blank" href="<{$config.weburl}>/?m=product&s=detail&id=<{$plist.pid}>">
          <img width=60 height=60 src="<{if !$plist.pic }><{$config.weburl}>/image/default/nopic.gif<{else}><{$plist.pic}><{/if}>" alt="<{$list.pname}>" />
          </a>
          </div>
          </td>
          <td class="bdr tl"><dl>
              <dt><a href="<{$config.weburl}>/?m=product&s=detail&id=<{$plist.pid}>"><{$plist.name}></a></dt>
              <dd><{$plist.price|number_format:2}> x <{$plist.num}></dd>
            </dl></td>
        </tr>
        <{/foreach}>
     	 </tbody>
      </table>
      <div class="step-title mt30"><em>第二步</em>确认发货信息</div>
      <div class="deliver-sell-info">
      	<strong class="fl">我的发货信息：</strong><br />
        
        <{foreach item=list key=num from=$addr}>
        <input type="radio" class="radio" <{if $list.default_receipt==1 or $num==0}>checked="checked"<{/if}> id="radio<{$list.id}>" name="deliver_addr_id" value="<{$list.id}>" />
        <label for="radio<{$list.id}>"><{$list.area}> <{$list.addr}> <{$list.name}> <{$list.tel}> <{$list.mobile}></label>
        <br />
        <{foreachelse}>
        	<a class="fr" href="main.php?m=logistics&s=admin_start_addr">添加发货地址</a>
        <{/foreach}>
        </div>
      <div class="step-title mt30"><em>第三步</em>选择物流服务</div>
      <table class="table-list-style fast">
        <tbody>
          <tr>
            <td width="150" class="bdl">公司名称</td>
            <td width="10"></td>
            <td class="tl">物流单号</td>
            <td width="90" class="bdr">操作</td>
          </tr>
            <{foreach item=list from=$fastmail}>
            <tr>
              <td class="bdl"><{$list.company}></td>
              <td class="bdl"></td>
              <td class="tl"><input type="text" class="text w300" name="deliver_code" value="" values="<{$list.id}>" genre="send"></td>
              <td class="bdl bdr"><a class="btn2" href="javascript:void(0);" <{if $addr}>values="<{$list.id}>" values1="<{$list.company}>" genre="send" <{else}>onclick="alert('请选择发货地址！')"<{/if}> >确认</a></td>
            </tr>
            <{/foreach}>
          </tbody>
      </table>
      <input type="hidden" id="deliver_id" name="deliver_id" value="" />
      <input type="hidden" id="deliver_name" name="deliver_name" value="" />
    </form>
    <script>
        $('a[genre="send"]').live('click',function(){
			if ($('input[values="'+$(this).attr('values')+'"]').val() == ''){
				alert('请填写物流单号！');return false;
			}
			$('input[genre="send"]').attr('disabled',true);
			$('input[values="'+$(this).attr('values')+'"]').attr('disabled',false);
			$('#deliver_id').val($(this).attr('values'));
			$('#deliver_name').val($(this).attr('values1'));
			$('#deliver_form').submit();
		});
        </script> 
    <{else}>
    <div class="hd">
      <ul class="tabs">
        <li class="<{if $smarty.get.status}>normal<{else}>active<{/if}>"><a href="main.php?m=product&s=admin_deliver">等待发货的订单</a></li>
        <li class="<{if $smarty.get.status=='delivering'}>active<{else}>normal<{/if}>"><a href="main.php?m=product&s=admin_deliver&status=delivering">发货中的订单</a></li>
        <li class="<{if $smarty.get.status=='delivered'}>active<{else}>normal<{/if}>"><a href="main.php?m=product&s=admin_deliver&status=delivered">已收到货的订单</a></li>
      </ul>
    </div>
    <table class="table-list-style order">
      <tbody>
      <{foreach item=sellist from=$slist.list}>
      <tr>
        <td class="sep-row" colspan="20"></td>
      </tr>
      <tr>
        <th colspan="20"> <span class="fl ml10">订单编号：<span style="color: #339900; font-family: Tahoma;"><{$sellist.order_id}></span></span> <span class="fl ml20">下单时间：<span style="color: #999999; font-family: Tahoma;"><{$sellist.creat_time|date_format:"%Y-%m-%d %H:%M:%S"}></span></span> <{if $smarty.get.status}><span class="fl ml20"><a target="_blank" class="order_show" href="<{$config.weburl}>/main.php?m=product&s=admin_orderdetail&id=<{$sellist.order_id}>">查看订单</a></span><{/if}><{if $smarty.get.status}><span class="fl ml20"><a target="_blank" class="order_show" href="http://www.kiees.cn/kj.php?wen=<{$sellist.deliver_code }>">查看物流</a></span><{/if}> </th>
      </tr>
      <tr>
        <td width="10" class="bdl"></td>
        <td colspan="3" width=""><table class="deliver">
            <{foreach item=plist from=$sellist.product}>
            <tr>
              <td class="w80"><div class="pic-small"> <a target="_blank" href="<{$config.weburl}>/?m=product&s=detail&id=<{$plist.id}>"> <img width=60 height=60 src="<{if !$plist.pic }><{$config.weburl}>/image/default/nopic.gif<{else}><{$plist.pic}><{/if}>" alt="<{$list.pname}>" /> </a> </div></td>
              <td class="tl"><dl>
                  <dt><a target="_blank" href="<{$config.weburl}>/?m=product&s=detail&id=<{$plist.pid}>"><{$plist.name}></a></dt>
                  <dd><{$plist.price|number_format:2}> x <{$plist.num}></dd>
                </dl></td>
            </tr>
            <{/foreach}>
          </table></td>
        <td class="order-info"><p><{$sellist.user}><a href="main.php?m=message&s=admin_message_sed&uid=<{$sellist.userid}>" class="message" target="_blank"></a>
          <p>
          <dl>
            <dt>收货信息：</dt>
            <dd>
              <p><{$sellist.buyer_addr}></p>
              <p><{$sellist.buyer_name}></p>
              <p><{$sellist.buyer_tel}> <{$sellist.buyer_mobile}></p>
            </dd>
          </dl>
          <{if !$smarty.get.status}><a href="?m=product&s=admin_deliver&status=send&id=<{$sellist.order_id}>" class="btn2">发货</a><{/if}> </td>
      </tr>
      <{foreachelse}>
      <tr>
        <td colspan="20" class="norecord"><i></i><span>暂无符合条件的数据记录</span></td>
      </tr>
      <{/foreach}>
        </tbody>
      
      <tfoot>
        <tr>
          <td colspan="20"><div class="pagination"><{$slist.page}></div></td>
        </tr>
      </tfoot>
    </table>
    <{/if}> </div>
</div>
